<?php

namespace app\admin\controller;

use app\admin\logic\FileLogic;
use support\Backend\BackendController;
use support\Container;
use support\Response;

/**
 * 文件管理
 * @author bh
 * @since 2025/01/02
 */
class FileController extends BackendController
{
    public function __construct()
    {
        parent::__construct();
        $this->logic = Container::get(FileLogic::class);
    }

    /**
     * 文件统计
     * @return Response
     */
    public function statistics(): Response
    {
        return success($this->logic->statistics());
    }

    /**
     * 文件重命名
     * @return Response
     */
    public function rename(): Response
    {
        return success($this->logic->rename());
    }
}